﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="projectcount.aspx.cs" Inherits="User_projectcount" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>项目个人项目统计</title>
     <link rel="stylesheet" type="text/css" href="../CSS/Style.css"/>
     <script type="text/javascript" src="../js/basic.js"></script>
    <style type="text/css">
    .count_main{
     margin:10px 10px;
     
    }
    th { 
    color: #4f6b72; 
 border-right: 1px solid #C1DAD7; 
border-bottom: 1px solid #C1DAD7; 
border-top: 1px solid #C1DAD7; 
letter-spacing: 2px; 
text-transform: uppercase; 
text-align: left; 
padding: 6px 6px 6px 6px; 
background: #CAE8EA no-repeat; 
} 
th.nobg { 
border-top: 0; 
border-left: 0; 
border-right: 1px solid #C1DAD7; 
background: none; 
} 
th.title{
 text-align:center;
  font-size:1.6em;
}
td { 
border-right: 1px solid #C1DAD7; 
border-bottom: 1px solid #C1DAD7; 
background: #fff; 
font-size:12px; 
padding: 6px 6px 6px 6px; 
color: #4f6b72; 
text-align: left; 
} 
   </style>
</head>
<body>
    <form id="form1" runat="server">
    <center>
    <div class="count_main">
        <asp:Repeater ID="RProjectCount" runat="server">
        <HeaderTemplate>
           <table id="tblSort"><thead><tr><th colspan="7" class="title">个人申报项目统计表（<span id="year">2011-2007</span>）</th></tr>
                       <tr>
                       <th style="width:80px;cursor:pointer" onclick="sortTable('tblSort', 0,'int')" title="按年份排序" >年份</th><th style="width:80px;cursor:pointer" onclick="sortTable('tblSort', 1)" title="按进度排序">项目进度</th>
                       <th style="width:80px;cursor:pointer" onclick="sortTable('tblSort', 2)" title="按申报类型排序">申报类型</th><th style="width:200px;cursor:pointer" onclick="sortTable('tblSort', 3)" title="按名称排序">名称</th>
                       <th style="width:80px;cursor:pointer" onclick="sortTable('tblSort', 4)" title="按级别排序">级别</th><th style="width:80px;cursor:pointer" onclick="sortTable('tblSort', 5)" title="按类型排序">项目类型</th>
                       <th style="width:180px;cursor:pointer" onclick="sortTable('tblSort', 6,'date')" title="按日期排序">日期</th></tr></thead>
        </HeaderTemplate>
        <ItemTemplate>
        <tr><td><%# Eval("year") %></td><td><%# strStatus(Eval("status").ToString()) %></td><td><%# Eval("type") %></td><td><%# Eval("pname") %></td><td><%# Eval("plevel") %></td><td><%# Eval("ptype") %></td><td><%# Eval("builddate") %></td></tr>
        </ItemTemplate>
        <FooterTemplate></table></FooterTemplate>
        </asp:Repeater>
    </div>
    <div style="color:#4f6b72;"><span>统计说明：</span> 共有项目<span id="s1">0</span>个，其中国家级项目<span id="s2">0</span>个，省级项目<span id="s3">0</span>个，校级项目<span id="s4">0</span>个，已立项项目<span id="s5">0</span>个</div>
    <div class="count_main">选择年限：<asp:DropDownList ID="ddlYear" runat="server" 
            AutoPostBack="True" onselectedindexchanged="ddlYear_SelectedIndexChanged">
        </asp:DropDownList>
        导出为MS-Excel<asp:ImageButton ID="ibtnExcel" runat="server" 
            ImageUrl="~/Images/ms-excel.png" onclick="ImageButton1_Click" 
            ToolTip="导出所有项目" />
            </div>
    </center>
    </form>
    <script type="text/javascript">
    var years=document.getElementById("year");
    var values=document.getElementById("ddlYear");
    years.innerHTML=values.options[values.selectedIndex].text;
    
     var table=document.getElementById("tblSort");
     var s1=document.getElementById("s1");
     s1.innerHTML=table.rows.length-2;
     var s2=0,s3=0,s4=0,s5=0;
//     s1.innerHTML=table.rows[3].cells[4].innerText; 
     for (i=2; i < table.rows.length; i++) {   
        if(table.rows[i].cells[4].innerText=="国家级")
           s2++;
        if(table.rows[i].cells[4].innerText=="省级")   
          s3++;
         if(table.rows[i].cells[4].innerText=="校级")   
          s4++;
          if(table.rows[i].cells[1].innerText=="已立项")   
          s5++;
         }
         document.getElementById("s2").innerHTML=s2;
         document.getElementById("s3").innerHTML=s3;
         document.getElementById("s4").innerHTML=s4;
         document.getElementById("s5").innerHTML=s5;
    </script>
</body>
</html>

